import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:flutterroom/widgets/page_content.dart';


class RegisterPage extends StatefulWidget {
  @override
  _RegisterPageState createState() => _RegisterPageState();
}

class _RegisterPageState extends State<RegisterPage> {
  final router = Router();
  bool showPassword = false;
  @override
  Widget build(BuildContext context) {
    var scaffold = Scaffold(
      appBar: AppBar(
        title: Text("注册"),
      ),
      body: SafeArea(
        minimum: EdgeInsets.all(30),
        child: ListView(
          children: <Widget>[
            Padding(padding: EdgeInsets.all(10)),
            TextField(
              decoration: InputDecoration(labelText: "用户名", hintText: "请输入用户名"),
            ),
            Padding(padding: EdgeInsets.all(5)),
            TextField(
              decoration: InputDecoration(
                  labelText: "密码",
                  hintText: "请输入密码",
                  ),
              //密码模式
              obscureText: true,
            ),
             Padding(padding: EdgeInsets.all(5)),
            TextField(
              decoration: InputDecoration(
                  labelText: "确认密码",
                  hintText: "请再次输入密码",
                  ),
              //密码模式
              obscureText: true,
            ),
            Padding(padding: EdgeInsets.all(25)),
            Container(
              height: 44,
              child: RaisedButton(
                color: Colors.green,
                onPressed: () {},
                child: Text("注册",style: TextStyle(color:Colors.white),),
              ),
            ),
            Padding(padding: EdgeInsets.all(5)),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Text("已有账号，"),
                FlatButton(
                    onPressed: () {
                      Navigator.pop(context);
                    },
                    child: Text(
                      "去登录~",
                      style: TextStyle(color: Colors.green),
                    ))
              ],
            )
          ],
        ),
      ),
    );
    return scaffold;
  }
}
